<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>GrPPI: Install Notes</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.svg"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">GrPPI
   &#160;<span id="projectnumber">0.3.1</span>
   </div>
   <div id="projectbrief">Generic and Reusable Parallel Pattern Interface</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Install Notes </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><h2>Building the GrPPI library</h2>
<p>GrPPI is a <em>header-only</em> library. Consequently, no build process is required for the library itself.</p>
<p>However, GrPPI includes CMake scripts for supporting the following actions:</p>
<ul>
<li>Building the unit tests.</li>
<li>Performing coverage analysis on unit tests.</li>
<li>Generating the <b>doxygen</b> based documentation.</li>
<li>Building the sample programs.</li>
<li>Installing the library in your system</li>
</ul>
<p>To setup the build scripts we recommend that you create an <em>out-of-source</em> directory under the GrPPI root directory:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;mkdir build</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;cd build</div></div><!-- fragment --><p>Then, you may generate the scripts by just doing:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cmake ..</div></div><!-- fragment --><p>Finally, you launch the build process with:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;make</div></div><!-- fragment --><h2>Building the unit tests</h2>
<p>To build the unit tests, you need to set configuration variable <code>GRPPI_UNIT_TEST_ENABLE</code> to <code>ON</code>. You can do so be using the CMake GUI or by typing:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cmake .. -DGRPPI_UNIT_TEST_ENABLE=ON</div></div><!-- fragment --><p>Then, you can build the unit tests by typing:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;make</div></div><!-- fragment --><h2>Control of back-ends</h2>
<p>GrPPI offers multiple back-ends:</p>
<ul>
<li><em>Sequential</em>: Always enabled.</li>
<li><em>Native</em>: Always enabled.</li>
<li><em>OpenMP</em>: Can be enabled/disabled.</li>
<li><em>Intel TBB</em>: Can be enabled/disabled.</li>
<li><em>FastFlow</em>: Can be enabled/disabled.</li>
</ul>
<p>You may want to disable specific back ends. GrPPI offers specific variables to control this issue:</p>
<ul>
<li><code>GRPPI_OMP_ENABLE</code>: Enable/disable OpenMP back-end.</li>
<li><code>GRPPI_TBB_ENABLE</code>: Enable/disable TBB back-end.</li>
<li><code>GRPPI_FF_ENABLE</code>: Entable/disable FastFlow back-end.</li>
</ul>
<h3>OpenMP back-end</h3>
<p>The OpenMP back-end is controlled by CMake option <code>GRPPI_OMP_ENABLE</code> (values can be <code>ON</code> or <code>OFF</code>). You can enable/disable this back-end with this option.</p>
<p>GrPPI uses CMake's <code>FindOpenMP</code> to detect if your compiler supports OpenMP. In case your compiler supports OpenMP <code>GRPPI_OMP_ENABLE</code> will default to <code>ON</code>. If your compiler does not support OpenMP any attempt to enable GrPPI/OpenMP back-end will be ignored.</p>
<p>If you have and OpenMP compliant compiler and GrPPI refuses to enable the OpenMP back-end, please, open an issue providing details.</p>
<h3>Intel TBB back-end</h3>
<p>The Intel TBB back-end is controlled by CMake option <code>GRPPI_TBB_ENABLE</code> (values can be <code>ON</code> or <code>OFF</code>). You can enable/disable this back-end with this option.</p>
<p>GrPPI tries to detect if your system has Intel TBB installed. In case, Intel TBB is found <code>GRPPI_TBB_ENABLE</code> will default to <code>ON</code>. If Intel TBB is not found, any attempt to enable GrPPI/TBB back-end will be ignored.</p>
<p>Please refer to (Additional Libraries)[#additional-libraries] for details on Intel TBB install.</p>
<p>If you have installed Intel TBB and GrPPI refuses to enable the TBB back-end, please, open an issue providing details.</p>
<h3>FastFlow back-end</h3>
<p>The FastFlow back-end is controlled by CMake option <code>GRPPI_FF_ENABLE</code> (values can be <code>ON</code> or <code>OFF</code>). You can enable/disable this back-end with this option.</p>
<p>GrPPI tries to detect if your system has FastFlow installed. In case, FastFlow is found <code>GRPPI_TBB_ENABLE</code> will default to <code>ON</code>. If FastFlow is not found, any attempt to enable GrPPI/FF back-end will be ignored.</p>
<p>Please refer to (Additional Libraries)[#additional-libraries] for details on Intel TBB install.</p>
<p>If you have installed FastFlow and GrPPI refuses to enable the FastFlow back-end, please, open an issue providing details.</p>
<h2>Running the unit tests</h2>
<p>To run all the unit tests you can do:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;make test</div></div><!-- fragment --><p>or alternatively:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;ctest</div></div><!-- fragment --><h3>Performing coverage analysis</h3>
<p>To perform a coverage analysis type:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;make coverage</div></div><!-- fragment --><p>The coverage HTML reports are generated under <code>unit_tests/mycov/index.html</code>.</p>
<h3>Documentation generation</h3>
<p>Documentation generation is disabled by default. However, if you wish to build the documentation yourself, you may enable the option:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cmake .. -DGRPPI_DOXY_ENABLE=ON</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;make</div></div><!-- fragment --><p>This will generate a doc directory under your build tree with the generated documentation.</p>
<p><b>Note:</b> You will need a <b>doxygen</b> in your system to make use of this option. You will also need <b>graphviz</b>.</p>
<h3>Building the sample programs</h3>
<p>GrPPI includes a number of example programs under directory <b>samples</b>. To build all samples you may use:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cmake .. -DGRPPI_EXAMPLE_APPLICATIONS_ENABLE=ON</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;make</div></div><!-- fragment --><h3>Installing GrPPI</h3>
<p>If you want to install GrPPI in your system, it will be installed using as base path the directory defined by <code>CMAKE_INSTALL_PREFIX</code>. You do not need to do anything special if you want to install in the default location.</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;sudo make install</div></div><!-- fragment --><p>On many Linux systems, this will install the header files under <code>/usr/local/include/grppi</code>.</p>
<p>You can specify a different install directory to CMake:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cmake .. -DCMAKE_INSTALL_PREFIX=path/to/folder</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;make install</div></div><!-- fragment --><h2>Supported Compilers</h2>
<p>For using GrPPI you need a C++14 compliant compiler.</p>
<p>GrPPI has been tested with the following compilers:</p>
<ul>
<li>**g++** 6.3, 7.2.</li>
<li>**clang++** 3.9, 4.0, 5.0.</li>
</ul>
<p>If you want to use a different compiler than the default one, you can specify it by doing:</p>
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;cmake .. -DCMAKE_CXX_COMPILER=clang++-4.0</div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;make</div></div><!-- fragment --><h2>Required Libraries</h2>
<p>No external library is strictly required for basic GrPPI use. It only hard dependency is the C++ standard library.</p>
<h2>Additional Libraries</h2>
<p>In order to use the <b>Intel Threading Building Blocks</b> (TBB) back-end you need to install the following library:</p>
<ul>
<li><a href="https://www.threadingbuildingblocks.org/">TBB</a></li>
</ul>
<p>In order to use the <b>FastFlow</b> back-end you need to install it. You can obtain a recent version from:</p>
<ul>
<li><a href="https://github.com/fastflow/fastflow">FastFlow</a></li>
</ul>
<p><b>IMPORTANT NOTE</b>: Current version of fastflow has two minor issues. Until this is fixed you can get this <a href="https://github.com/jdgarciauc3m/fastflow">fork</a></p>
<h2>Unit tests and coverage analysis</h2>
<p>For unit testing GrPPI uses the GoogleTest framework.</p>
<p>You can obtain Get it from:</p>
<ul>
<li><a href="https://github.com/google/googletest">GoogleTest</a></li>
</ul>
<p>If you want to run unit tests and perform coverage analysis you will need:</p>
<ul>
<li><a href="https://github.com/linux-test-project/lcov">lcov</a> To generate gcov HTML reports. </li>
</ul>
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
